package me.midday.java.base.knowledge.reflection;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.reflect.Constructor;


@interface Anno {}
@Retention(value= RetentionPolicy.RUNTIME)
@interface Annos{
    Anno[] value();
}
@SuppressWarnings(value="unchecked")

@Anno
public class ClassTest {
    private ClassTest(){};


    public ClassTest(String name){
        System.out.println("执行有参数的构造器");
    }

    public void info(){
        System.out.println("执行info without param ");
    }

    public void info(String str){
        System.out.println("run info method with param:  " +  str);
    }

    class Inner{
    }

    public static void main(String[] args){
        Class<ClassTest> clazz = ClassTest.class;

        Constructor[] ctors = clazz.getDeclaredConstructors();
        System.out.println("ClassTest all constructor: ");
        for(Constructor c: ctors){
            System.out.println(c);
        }


    }

}


